//
//  ScrollViewCell.m
//  RRIsSmallPig
//
//  Created by K。 on 15/7/24.
//  Copyright (c) 2015年 寇广超. All rights reserved.
//

#import "ScrollViewCell.h"

@implementation ScrollViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    
    return self;
}
-(void)createSubviews
{
    self.bigImageView = [[UIImageView alloc] initWithFrame:self.contentView.frame];
    [self.contentView addSubview:self.bigImageView];
    
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 40, 300, 30)];
    self.nameLabel.textColor = [UIColor whiteColor];
    self.nameLabel.font = [UIFont systemFontOfSize:17];
    [self.bigImageView addSubview:self.nameLabel];
    
    
    self.englishNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 55, 300, 30)];
    self.englishNameLabel.textColor = [UIColor whiteColor];
    self.englishNameLabel.font = [UIFont systemFontOfSize:13];
    [self.bigImageView addSubview:self.englishNameLabel];
    
    
    self.pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(180, 500, 200, 10)];
    self.pageControl.backgroundColor = [UIColor clearColor];
    self.pageControl.numberOfPages = 10;
    self.pageControl.currentPage = 0;
    self.pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
    self.pageControl.pageIndicatorTintColor = [UIColor whiteColor];
    [self addSubview:self.pageControl];
    


}
-(void)pageControlPage:(NSInteger)page
{
    self.pageControl.currentPage = page;


}

//****为毛线值没传过来 次奥

-(void)layoutSubviews
{
    [super layoutSubviews];
    
//    [self.bigImageView sd_setImageWithURL:[NSURL URLWithString:self.scrModle.imagePathLandscape] placeholderImage:[UIImage imageNamed:nil]];
//    NSLog(@"image == %@",_bigImageView.image);
//    self.nameLabel.text = _scrModle.name;
//    self.englishNameLabel.text = _scrModle.englishName;
    

   
}
@end
